const path = require('path')

module.exports = {
entry: './src/index.js',
output: {
  filename: 'bundle.js',
  path: path.resolve(__dirname, 'dist')
},
mode: 'production',
module: {
  rules: [
    {
      test: /\.css$/,
      // webpack 加载 loader 的顺序
      // 和定义的顺序是反过来的
      use: [
        'style-loader',
        'css-loader'
      ]
    },
    {
      test: /\.less$/,
      use: [
        'style-loader',
        'css-loader',
        'less-loader'
      ]
    }
  ]
}
}
